]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
main: Get the theme resource name from sessionMode
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Tue, 3 Mar 2020 09:05:54 +0000 (10:05 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Fri, 6 Mar 2020 19:09:25 +0000 (19:09 +0000)
Along the lines of `styleSheetName`, a session mode may want to provide its
own gresource file, so make this possible via a `themeResourceName` session
mode parameter, defaulted to gnome-shell-theme.gresource

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1063

js/ui/main.js
js/ui/sessionMode.js

index 05b30d5449e1c41d98183e713a45d1574a3ec074..6b180bd9be5afcf3d58483e818c90800e994f03c 100644 (file)
@@ -361,7 +361,8 @@ function reloadThemeResource() {
     if (_themeResource)
         _themeResource._unregister();
 
-    _themeResource = Gio.Resource.load('%s/gnome-shell-theme.gresource'.format(global.datadir));
+    _themeResource = Gio.Resource.load('%s/%s'.format(global.datadir,
+        sessionMode.themeResourceName));
     _themeResource._register();
 }
 
index 1c52987708caca79a12c132f9f532b022598770f..e12fc2ef48c18d0944239c5b86d1bf3e74db5dd8 100644 (file)
@@ -15,6 +15,7 @@ const _modes = {
     'restrictive': {
         parentMode: null,
         stylesheetName: 'gnome-shell.css',
+        themeResourceName: 'gnome-shell-theme.gresource',
         hasOverview: false,
         showCalendarEvents: false,
         allowSettings: false,